﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Core.BusinessLogic.Interfaces;
using System.ComponentModel.Composition;
using Core.Common;
using Core.DataAccess.IRepositories;
using Core.DataAccess;

namespace Core.BusinessLogic
{
    [Export(typeof(IFolderService))]
    public class FolderService : IFolderService
    {
        [Import]
        private IFolderRepository _repository;

        public FolderService()
        {
            MEFManager.Compose(this);
        }

        public Guid SaveFolder(DataAccess.Folder folder)
        {
            return _repository.SaveFolder(folder);
        }


        public Folder GetNewestFolderID(int accountID)
        {
            return _repository.GetNewestFolderID(accountID);
        }


        public Folder GetFolderByAccountID(int accountID)
        {
            return _repository.GetFolderByAccountID(accountID);
        }

        public List<Guid> GetFolderIdByAccountId(List<int> accountIds)
        {
            return _repository.GetFolderIdByAccountId(accountIds);
        }
    }
}
